package org.xiji.template;

/**
 * 模板方法实现类
 */
public class MyDay extends OnePersonWeek{
    //
    private int day=1;

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    /**
     *
     * 判断是否是周末
     */
    @Override
    public boolean judgeDay() {
        if (this.day == 0 || this.day == 6) {
            return false;
        }

        return true;
    }

    /**
     * 做自己喜欢的事情
     */
    @Override
    public void doMyFavourThing() {
        System.out.println("今天出去散步，心情愉悦");
    }
}
